-- GENERATED SPELL FOR [Bloodsail Sea Dog] --


function spell0_1565(pUnit, Event) --@Backstab,n/a--
pUnit:FullCastSpellOnTarget(37685,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1565', 543, 1)
end

function spell1_1565(pUnit, Event) --@Gouge,n/a--
pUnit:FullCastSpellOnTarget(12540,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1565', 4312, 1)
end

function spell2_1565(pUnit, Event) --@Poison,n/a--
pUnit:FullCastSpellOnTarget(744,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1565', 30000, 1)
end

function Sorts_1565(pUnit, Event)
local choix_sorts_1565 = math.random(0, 2)
if choix_sorts_1565 == 0 then
pUnit:RegisterEvent('spell0_1565', 1, 1)
end
if choix_sorts_1565 == 1 then
pUnit:RegisterEvent('spell1_1565', 1, 1)
end
if choix_sorts_1565 == 2 then
pUnit:RegisterEvent('spell2_1565', 1, 1)
end
end

function mob1565_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1565', math.random(1500, 3000), 1)
end

function mob1565_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1565_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1565_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1565, 1, 'mob1565_Action')
RegisterUnitEvent(1565, 2, 'mob1565_Leave')
RegisterUnitEvent(1565, 3, 'mob1565_Kill')
RegisterUnitEvent(1565, 4, 'mob1565_Die')
